<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../stylesheet.css" type="text/css"> 
<title>Szkoła jazdy :: Wybór instruktora</title>
</head>
<body>
<div id="top">
<div id="HEADER"> </div>
<h1>Aby zapisać się na kurs, wybierz instruktora jazdy <c:if test="${enrollTo=='ride'}">i kategorię</c:if>:</h1>
<form action="available-courses.htm" method="POST">
Instruktor: <select name="sid">
	<OPTION value="" selected>- Wybierz -</OPTION>
	<c:forEach items="${staff}" var="staffMember">
	<option value="${staffMember.id}">${staffMember.firstName} ${staffMember.lastName}</option>
	</c:forEach>
</select>
<br>
<c:if test="${enrollTo=='group'}">
<input type="hidden" name="gid" value="${groupId}">
<input type="hidden" name="catId" value="0">
</c:if>

<c:if test="${enrollTo=='ride'}">
Kategoria: <select name="catId">
	<OPTION value="" selected>- Wybierz -</OPTION>
	<c:forEach items="${categories}" var="category" varStatus="status">
	<option value="${status.index}">${category}</option>
	</c:forEach>
</select>
<input type="hidden" name="gid" value="0">
</c:if>

<input type="hidden" name="enrollTo" value="${enrollTo}">
<input type="submit" value="OK"/> 
</form>

<a href="javascript:history.back();">Wstecz</a>
<div id="FOOTER">Pinky &amp; Mózg Inc. Dejta Bejses Prodżekt</div>

</div>
</body>
</html>